package com.example.demo.abstractfactorypattern.factory;

/**
 * @author :xie
 * Email: 1487471733@qq.com
 * Date: 2018/9/6
 * Time: 18:45
 * Describe:
 */
public class FactoryProducer {

    public static  AbstractFactory getFactory(String a){
        if (a.equals("car")){

            return new CarFactory();
        }
        if (a.equals("color")){
            return new ColorFactory();
        }

        return null;

    }
}
